import { LocalStorage } from './service/localStorage.service';

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { zh_CN } from 'ng-zorro-antd/i18n';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { FormsModule, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { PengesoftNgLibModule, PyHttpRequestInterceptor } from 'pengesoft-ng-lib';
import { PrototypeEx, PyTabProviderModule} from 'pengesoft-ng-lib';
import { HomeComponent } from './components/home/home.component';
import { HouseDetailsComponent } from './components/house-details/house-details.component';
import { CustomerServiceSvr } from './service/register.service';

// 自定义组件
import { PersonalCenterComponent } from './views/personal-center/personal-center.component';

import { SignComponent } from './components/sign/sign.component';
import { ContractComponent } from './components/contract/contract.component';
// ng-zorro
import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { NzInputModule } from 'ng-zorro-antd/input';
import { NzCommentModule } from 'ng-zorro-antd/comment';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzCardModule } from 'ng-zorro-antd/card';
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
import { NzCarouselModule } from 'ng-zorro-antd/carousel';
import { NzMenuModule } from 'ng-zorro-antd/menu';
import { PersonalDataComponent } from './components/personal-data/personal-data.component'
import { NzFormModule } from 'ng-zorro-antd/form';
import { RentManagementComponent } from './components/rent-management/rent-management.component';
import { RentalInformationComponent } from './components/rental-information/rental-information.component';
import { NzStepsModule } from 'ng-zorro-antd/steps'
import { NzSelectModule } from 'ng-zorro-antd/select';
import { LoginComponent } from './views/login/login.component';
import { RegisterComponent } from './views/register/register.component'
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
import { CollectionComponent } from './components/collection/collection.component';
import { HouseComponent } from './components/house/house.component';
import { IndexComponent } from './views/index/index.component';
import { MessageNotificationComponent } from './components/message-notification/message-notification.component';
import { NzBadgeModule } from 'ng-zorro-antd/badge';
import { NzRadioModule } from 'ng-zorro-antd/radio';
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
import { NzAlertModule } from 'ng-zorro-antd/alert';
import { NzSpinModule } from 'ng-zorro-antd/spin';
import { NzModalModule } from 'ng-zorro-antd/modal';
import { NzUploadModule } from 'ng-zorro-antd/upload';
import { NzListModule } from 'ng-zorro-antd/list';
import { NzTabsModule } from 'ng-zorro-antd/tabs';
import { RentManagementInformationComponent } from "./components/rent-management-information/rent-management-information.component";
import { RentManagementPaymentComponent } from './components/rent-management-payment/rent-management-payment.component';
import { RentManagementRepairComponent } from './components/rent-management-repair/rent-management-repair.component';
import { NzMessageModule } from 'ng-zorro-antd/message';
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzRateModule } from 'ng-zorro-antd/rate';
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
import { RentManagementQuitComponent } from './components/rent-management-quit/rent-management-quit.component';
import { RentManagementRenewalComponent } from './components/rent-management-renewal/rent-management-renewal.component';
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker';
import { NzPaginationModule } from 'ng-zorro-antd/pagination';
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
import { ReverseManagementComponent } from './components/reverse-management/reverse-management.component';
import { CanAuthProvide } from './guard/canLoad.guard';

PrototypeEx.use();

registerLocaleData(zh);

@NgModule({
    declarations: [
        AppComponent,
        HomeComponent,
        HouseDetailsComponent,
        PersonalCenterComponent,
        PersonalDataComponent,
        RentManagementComponent,
        RentalInformationComponent,
        LoginComponent,
        RegisterComponent,
        SignComponent,
        ContractComponent,
        CollectionComponent,
        HouseComponent,
        IndexComponent,
        MessageNotificationComponent,
        RentManagementInformationComponent,
        RentManagementPaymentComponent,
        RentManagementRepairComponent,
        RentManagementQuitComponent,
        RentManagementRenewalComponent,
        AppComponent,
        ReverseManagementComponent
    ],
    // providers: [{ provide: NZ_I18N, useValue: zh_CN }],
    providers: [CustomerServiceSvr, LocalStorage, CanAuthProvide],
    bootstrap: [AppComponent],
    imports: [
        BrowserModule,
        AppRoutingModule,
        FormsModule,
        HttpClientModule,
        BrowserAnimationsModule,
        PengesoftNgLibModule,
        PyTabProviderModule.forRoot(),
        NzLayoutModule,
        NzInputModule,
        NzButtonModule,
        NzCardModule,
        NzAvatarModule,
        NzCarouselModule,
        NzMenuModule,
        NzListModule,
        NzFormModule,
        NzStepsModule,
        NzRateModule,
        NzSelectModule,
        NzCommentModule,
        ReactiveFormsModule,
        NzIconModule,
        NzFormModule,
        NzSelectModule,
        ReactiveFormsModule,
        NzCheckboxModule,
        NzBadgeModule,
        NzSpinModule,
        NzRadioModule,
        NzDatePickerModule,
        NzAlertModule,
        NzModalModule,
        NzUploadModule,
        NzTabsModule,
        NzMessageModule,
        NzTableModule,
        NzToolTipModule,
        BrowserModule,
        NzCarouselModule,
        NzMenuModule,
        NzPaginationModule,
        NzCheckboxModule,
        NzPopconfirmModule,
        NzTimePickerModule
    ]
})
export class AppModule { }
